/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package test;

import java.awt.event.*;
import javax.swing.*;


/**
 *
 * @author Master
 */
public class Main extends JFrame {

    /**
     * @param args the command line arguments
     */
    public Main() {
        super("saleh");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(300,400);
        ayasm a = new ayasm();
        final JTable table = new JTable();
        table.setC
        table.enableInputMethods(true);
        table.setEditingColumn(4);
        table.setEditingRow(4);
        table.setEnabled(true);
        table.addMouseListener(new MouseListener()
        {
            {
                
            }

            public void mouseClicked(MouseEvent e) {
                
                Object obj = JOptionPane.showInputDialog("Enter value for this cell",0);
                table.setValueAt(obj, table.getSelectedRow(), table.getSelectedColumn());
                
                JOptionPane.showMessageDialog(null, "you click Row: "+table.getSelectedRow()+ " and Column: " + table.getSelectedColumn());
            }

            public void mousePressed(MouseEvent e) {
                
            }

            public void mouseReleased(MouseEvent e) {
                
            }

            public void mouseEntered(MouseEvent e) {
                
            }

            public void mouseExited(MouseEvent e) {
                
            }
        });
        final JTextField text = new JTextField(20);
        JButton button = new JButton("click");
        
        button.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                
            }
        
            
        });
        add(table);
        setVisible(true);
        pack();
        
    }

    public static void main(String[] args) {
    new Main();
    }
}
